<?php
/*
 * Created on Dec 24, 2009
 *
 * To change the template for this generated file go to
 * Window - Preferences - PHPeclipse - PHP - Code Templates
 */
require_once 'chat.php';

if (!$settings['home_chatid']){
	$home_chatid=createNewChatSession();
	$result=insertNewSetting("home_chatid",$home_chatid);
}

if (!$settings['leaderboard_chatid']){
	$leaderboard_chatid=createNewChatSession();
	$result=insertNewSetting("leaderboard_chatid",$leaderboard_chatid);
}


##to be removed at later stage
##serves only the transition purpose
//to adhoc create chatlogid for old users
if (isset($user) && $user){
	if (!(isset($user['chatlogid']) && $user['chatlogid'])){
		$chatlogid=createNewChatSession();
		$user['chatlogid']=$chatlogid;
		$result=updateUsers($user['nickname'],"chatlogid",$chatlogid);
	}
}
?>
